Skip to content

Conversation

hestro
Copy link
Member

@hestro hestro commented Nov 11, 2026

This PR adds a set of small UI, styling and accessibility fixes:

  • Add the missing breadcrumb to the books page
  • Add a role and aria-label to the rating text on book cards, so screen readers announce it as a rating
  • Remove the "rating" word from book card ratings on the profile page, where the smaller cards made the text wrap awkwardly
  • Set color-scheme for light and dark mode, which reduces the light blue autofill background on the search input in dark mode
  • Tweak the selected book layout
  • Make it clearer what "unknown" on the cards mean
  • Set a dynamic page title on the selected book page, using <title> in the component instead of meta, since the title depends on data about the book

Closes #125
Closes #96

Add a BooksBreadcrumb function that renders PageBreadcrumb with Home and
Books. It is a separate function because
the breadcrumb is needed in every return of the component
The cards are smaller on the profile page, which made the rating text
wrap awkwardly
Chrome painted a light blue autofill background on the search input when a previous search was picked in dark mode.
With a color-scheme for light and dark mode the browser uses matching native styling.
This does not remove the autofill tint completely, but it is much better in both themes.
Render a title in the selected book page component instead of exporting meta, since the title depends on the book data that is defined dynamically in the route. React 19 "hoists" the tag into the head, so the tab title updates with the book.
@hestro hestro added the enhancement New feature or request label Nov 11, 2026
@hestro hestro added this to the Deliverable 4 milestone Nov 11, 2026
@hestro hestro self-assigned this Nov 11, 2026
@hestro hestro marked this pull request as ready for review November 11, 2026 19:05
@hestro hestro requested a review from a team as a code owner November 11, 2026 19:05
@hestro
Copy link
Member Author

hestro commented Nov 11, 2026

I also noticed our drop-downs currently don't use cursor: pointer, unlike our other buttons. I could add cursor: pointer to them as well if we want it - what do you think?

@martakam
Copy link
Member

I also noticed our drop-downs currently don't use cursor: pointer, unlike our other buttons. I could add cursor: pointer to them as well if we want it - what do you think?

Good catch, we should add that as well

@hestro
Copy link
Member Author

hestro commented Nov 12, 2026

I have removed the duplicate title from root.tsx and made sure all dropdowns use cursor: pointer, matching our other buttons.

I also added a log out button to the profile page, since it felt like a logical feature to have there.

@johahor
Copy link
Member

johahor commented Nov 12, 2026

Removing this fixed the duplicate titles 👍 but now nothing sets a title on the 404/error page: root has no meta, and ErrorBoundary is the only error boundary. On /project2/finnes-ikke the tab just shows the URL and document.title is empty (WCAG 2.4.2 Page Titled).

Could you add a title in ErrorBoundary?

<title>{`${message === "404" ? "Page not found" : "Error"} | Readr`}</title>

(A meta export in root would bring the duplicate back on the book page, since selectedBook has no meta and would inherit it.)

This comment was written with help of AI

Co-authored-by: Johannes Horn <johahor@stud.ntnu.no>
@hestro
Copy link
Member Author

hestro commented Nov 12, 2026

Good catch @johahor , should be fixed now

@martakam
Copy link
Member

(Just FYI: The CI checks will not run until all merge conflicts are solved)

Copy link
Member

@martakam martakam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for dealing with these issues!

Sign in to join this conversation on GitHub.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix: minor UI and styling tweaks feat: make it clear what "unknown" on the cards mean
3 participants